from django.db import models

# Create your models here.
class User(models.Model):
    phone=models.CharField(max_length=11,verbose_name='手机号')
    class Meta:
        verbose_name='用户表'
        verbose_name_plural=verbose_name
        db_table='user'
    def __str__(self):
        return self.phone

class Sele(models.Model):
    name=models.CharField(max_length=20,verbose_name='类别')
    class Meta:
        verbose_name='类别表'
        verbose_name_plural=verbose_name
        db_table='sele'
    def __str__(self):
        return self.name

class Goods(models.Model):
    name=models.CharField(max_length=30,verbose_name='地址')
    ping=models.CharField(max_length=30,verbose_name='评分')
    shou=models.CharField(max_length=30,verbose_name='月售')
    zhuan=models.CharField(max_length=30,verbose_name='平台')
    lei=models.ForeignKey(Sele,on_delete=models.CASCADE,verbose_name='所属类别')
    class Meta:
        verbose_name='详情表'
        verbose_name_plural=verbose_name
        db_table='goods'
    def __str__(self):
        return self.name
